using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class SacculusShoopMagMap : EntityTypeConfiguration<SacculusShoopMag>
    {
        public SacculusShoopMagMap()
        {
            // Primary Key
            this.HasKey(t => t.SSM_ID);

            // Properties
            this.Property(t => t.SSM_Name)
                .HasMaxLength(50);

            this.Property(t => t.SSM_Model)
                .HasMaxLength(100);

            this.Property(t => t.SSM_Diameter)
                .HasMaxLength(20);

            this.Property(t => t.SSM_SM_Long)
                .HasMaxLength(20);

            this.Property(t => t.SSM_TargetLesion)
                .HasMaxLength(50);

            this.Property(t => t.SSM_Time)
                .HasMaxLength(50);

            this.Property(t => t.SSM_atm)
                .HasMaxLength(20);

            this.Property(t => t.SSM_Order)
                .HasMaxLength(20);

            this.Property(t => t.SSM_SCE)
                .HasMaxLength(20);

            this.Property(t => t.SSM_Remark)
                .HasMaxLength(50);

            this.Property(t => t.SSM_Number)
                .HasMaxLength(50);

            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.SSM_OtherText)
                .HasMaxLength(50);

            this.Property(t => t.OtherTargetText)
                .HasMaxLength(50);

            this.Property(t => t.OtherNameText)
                .HasMaxLength(50);

            this.Property(t => t.SSM_LesionTag)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("SacculusShoopMag");
            this.Property(t => t.SSM_ID).HasColumnName("SSM_ID");
            this.Property(t => t.SSM_Name).HasColumnName("SSM_Name");
            this.Property(t => t.SSM_Model).HasColumnName("SSM_Model");
            this.Property(t => t.SSM_Diameter).HasColumnName("SSM_Diameter");
            this.Property(t => t.SSM_SM_Long).HasColumnName("SSM_SM_Long");
            this.Property(t => t.SSM_TargetLesion).HasColumnName("SSM_TargetLesion");
            this.Property(t => t.SSM_Time).HasColumnName("SSM_Time");
            this.Property(t => t.SSM_atm).HasColumnName("SSM_atm");
            this.Property(t => t.SSM_Order).HasColumnName("SSM_Order");
            this.Property(t => t.SSM_SCE).HasColumnName("SSM_SCE");
            this.Property(t => t.SSM_Remark).HasColumnName("SSM_Remark");
            this.Property(t => t.SSM_Number).HasColumnName("SSM_Number");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.Create_Time).HasColumnName("Create_Time");
            this.Property(t => t.State).HasColumnName("State");
            this.Property(t => t.SSM_OtherText).HasColumnName("SSM_OtherText");
            this.Property(t => t.OtherTargetText).HasColumnName("OtherTargetText");
            this.Property(t => t.OtherNameText).HasColumnName("OtherNameText");
            this.Property(t => t.Target_ID).HasColumnName("Target_ID");
            this.Property(t => t.SSM_NID).HasColumnName("SSM_NID");
            this.Property(t => t.SSM_LesionTag).HasColumnName("SSM_LesionTag");
            this.Property(t => t.DiameterID).HasColumnName("DiameterID");
        }
    }
}
